<template>
	<view class="container">
		<image src="https://hesen-gfn-public.oss-cn-shenzhen.aliyuncs.com/default/scanfail.png" class="failimg" mode=""></image>
		<view class="fail-tips">{{tips}}</view>
		
		<view class="fail-btn">
			<view @click="WeixinServer">联系客服</view>
			<view @click="backHome">返回主页</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tips:'此激活码已被使用，请联系休闲卡商家或客服'
			};
		},
		onLoad(options) {
			console.log(options,"options")
			if(options && options.tips) {
				this.tips = options.tips
			}
		},
		methods:{
			// 接入微信客服
			WeixinServer(){
				console.log("打开客服")
				wx.openCustomerServiceChat({
					extInfo: {
						url: 'https://work.weixin.qq.com/kf/' + "kfc11f5184d7762c658"
					},
					 corpId: 'ww106853c8ad050781',
				})
			},
			backHome(){
				uni.switchTab({
					url:'/pages/mine/mine',
					fail(fail) {
						console.log(fail)
					}
				})
			}
		}
	}
</script>
<style>
	page {
		background: #F4F4F4;
	}
</style>

<style lang="scss">
	.failimg {
		width: 150rpx;
		height: 150rpx;
		display: block;
		margin: 0 auto;
		margin-top: 267rpx;
		margin-bottom: 43rpx;
	}
	
	.fail-tips {
		width: 554rpx;
		margin: 0 auto;
		font-size: 34rpx;
		font-family: PingFang SC;
		color: #222222;
		line-height: 48rpx;
		text-align: center;
		margin-bottom: 100rpx;
	}

	.fail-btn {
		display: flex;
		width: 514rpx;
		margin: 0 auto;
		justify-content: space-between;
		height: 88rpx;
		
		view{
			width: 232rpx;
			height: 88rpx;
			background-color: #FA6400;
			border-radius: 44rpx;
			text-align: center;
			line-height: 88rpx;
			font-size: 32rpx;
			color: #000000;
		}
	}
</style>
